import {
  docTypes,
  excelTypes,
  imgTypes,
  pdfTypes,
  pptTypes,
  videoTypes,
  htmlTypes,
  textTypes,
} from '@/constant/file.constant'

type DocType = (typeof docTypes)[number]
type ExcelType = (typeof excelTypes)[number]
type ImgType = (typeof imgTypes)[number]
type PdfType = (typeof pdfTypes)[number]
type PptType = (typeof pptTypes)[number]
type VideoType = (typeof videoTypes)[number]
type HtmlType = (typeof htmlTypes)[number]
type TextType = (typeof textTypes)[number]

export type FileType =
  | DocType
  | ExcelType
  | ImgType
  | PdfType
  | PptType
  | VideoType
  | HtmlType
  | TextType

export const transType = (types: unknown) => types as string[]
